<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>乐淘云购-搜索</title>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="./lib/mui/css/mui.min.css">
    <link rel="stylesheet" href="./lib/fa/css/font-awesome.min.css">
    <link rel="stylesheet" href="./css/common.css">
    <link rel="stylesheet" href="./css/search.css">
</head>

<body>
    <div class="lt_container">
        <!-------------- header -------------->
        <div class="header">
            <a href="javascript:history.go(-1);" class="icon_left">
                <i class="mui-icon mui-icon-arrowleft"></i>
            </a>
            <div class="title">
                <h4>搜索中心</h4>
            </div>
        </div>
        <!-------------- main -------------->
        <div class="main">
            <div class="mui-scroll-wrapper">
                <div class="mui-scroll">
                    <div class="search_box">
                        <input type="text" name="key" placeholder="请输入搜索关键字">
                        <button class="mui-btn-primary btn-search">搜索</button>
                    </div>
                    <div class="history_list">
                        <!-- 动态生成 -->
                    </div>
                </div>
            </div>
        </div>
        <!-------------- footer -------------->
        <div class="footer">
            <ul>
                <li>
                    <a href="index.html">
                        <span class="fa fa-home"></span>
                        <p>首页</p>
                    </a>
                </li>
                <li>
                    <a href="category.html">
                        <span class="fa fa-bars"></span>
                        <p>分类</p>
                    </a>
                </li>
                <li>
                    <a href="cart.html">
                        <span class="fa fa-shopping-cart"></span>
                        <p>购物车</p>
                    </a>
                </li>
                <li>
                    <a href="user.html">
                        <span class="fa fa-user"></span>
                        <p>会员中心</p>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <script type="text/html" id="tmp">
        {{ if list.length > 0}}
        <div class="history_word mui-clearfix">
            <div class="word_left mui-pull-left">搜索历史</div>
            <div class="word_right mui-pull-right fa fa-trash">清空记录</div>
        </div>
        <ul>
            {{ each list v i }}
            <li class="mui-clearfix">
                <a href="searchList.html?key={{v}}" class="mui-pull-left">{{v}}</a>
                <span class="mui-icon mui-icon-closeempty mui-pull-right" data-index="{{i}}"></span>
            </li>
            {{ /each }}
        </ul>
        {{ else }}
        <p>没有历史记录</p>
        {{ /if }}
    </script>

    <script src="./lib/zepto/zepto.min.js"></script>
    <script src="./lib/mui/js/mui.js"></script>
    <script src="./lib/artTemplate/template-web.js"></script>
    <script src="./js/common.js"></script>
    <script src="./js/search.js"></script>
</body>

</html>